import java.util.UUID;


public class UUIDDemo {
	
	public static void main(String args[]) {		
		UUID randomId = UUID.randomUUID();
		String s1, s2;
		s1 = randomId.toString();
		s2 = randomId.toString().replace("-","");
		System.out.println("Random UUID:" + s1);
		System.out.println("Replace -  :" + s2);
		UUID speciID = new UUID(255, 200);
		System.out.println("Specified ID:" + speciID.toString());
		
		UUID sid1, sid2;
		sid1 = UUID.fromString(s1);
		System.out.println("S1 ID:" + sid1.toString());
		sid2 = UUID.fromString(s2);		//exception
		System.out.println("S2 ID:" + sid2.toString());
	}
}
